﻿using Ledict.ConditionExtract.DAL;
using Ledict.ConditionExtract.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ledict.ConditionExtract.BLL
{
    public class XF_Punishment_GradeBLL
    {
        XF_Punishment_GradeDAL xpgDal = new XF_Punishment_GradeDAL();

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(XF_Punishment_GradeModel model)
        {
            return xpgDal.Add(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(string ccId)
        {
            return xpgDal.Delete(ccId);
        }

        /// <summary>
        /// 根据法定刑幅度档次表案由和档次获取主键ID
        /// </summary>
        /// <param name="pg_CaseCauseID"></param>
        /// <param name="pg_Grade"></param>
        /// <returns></returns>
        public string GetPunishmentGradeID(string pg_CaseCauseID, string pg_Grade)
        {
            return xpgDal.GetPunishmentGradeID(pg_CaseCauseID, pg_Grade);
        }

        /// <summary>
        /// 获取法定刑幅度档次表数据
        /// </summary>
        /// <param name="ccid">节点信息</param>
        /// <returns></returns>
        public DataTable GetPunishmentGrade(string ccid)
        {
            return xpgDal.GetPunishmentGrade(ccid);
        }

        /// <summary>
        /// 修改字典值名称，通过PG_ID
        /// </summary>
        public bool UpdateName(XF_Punishment_GradeModel model)
        {
            return xpgDal.UpdateName(model);
        }

        /// <summary>
        /// 获取法定刑幅度档次表数据
        /// </summary>
        /// <param name="ccid">节点信息</param>
        /// <returns></returns>
        public DataTable GetPunishmentData(string ccid)
        {
            return xpgDal.GetPunishmentData(ccid);
        }


        /// <summary>
        /// 获取法定刑幅度档次表数据
        /// </summary>
        /// <param name="ccid">节点信息</param>
        /// <returns></returns>
        public DataTable GetFDXRelationData(string ccid)
        {
            return xpgDal.GetFDXRelationData(ccid);
        }
    }
}
